import request from '@/utils/request'

// 查询固件版本列表
export function getFirmwareList(query) {
    return request({
        url: '/ota/firmware/list',
        method: 'get',
        params: query
    })
}

// 发布固件版本
export function addFirmware(data) {
    return request({
        url: '/ota/firmware/add',
        method: 'post',
        data: data
    })
}

// 更新固件版本
export function updateFirmware(data) {
    return request({
        url: '/ota/firmware/update',
        method: 'post',
        data: data
    })
}

// 删除固件版本
export function deleteFirmware(ids) {
    return request({
        url: `/ota/firmware/delete?ids=${ids}`,
        method: 'post'
    })
}
